{% import "./macros.html" as macros %}

{%- if doc.methods %}
<section class="api-section">
  <h2>Methods</h2>
  <br/>
  <ul class="methods">
    {%- for method in doc.methods %}
    <li id="{$ method.name $}">
      <h3 class="method-function-syntax">
        <code class="method-function-syntax">{$ doc.name $}.{$ macros.functionSyntax(method) $}</code>
      </h3>
      <div class="service-desc">{$ method.description | marked $}</div>

      <div class="method-param-table">

      {% if method.params %}
      {$ macros.paramTable(method.params) $}
      {% endif %}

      {% if method.this %}
      <h4>Method's {% code %}this{% endcode %}</h4>
      {$ method.this | marked $}
      {% endif %}

      {% if method.returns %}
      {$ macros.returnTable(method.returns) $}
      {% endif %}

      </div>

    </li>
    {% endfor -%}
  </ul>
</section>
{%- endif -%}
